1. Field of Invention
The present invention pertains to the field of computer graphics systems. More particularly, this invention relates to direction-dependent texture maps in a computer graphics system.
2. Art Background
A typical computer graphics system includes a display device having a two-dimensional (2D) array of light emitting areas. The light emitting areas are usually referred to as pixels. Such a computer graphics system typically implements hardware and/or software for generating a 2D array of color values that determine the colors that are to be emitted from the corresponding pixels of the display device.
Such computer graphics systems are commonly employed for the display of three-dimensional (3D) objects. Typically, such a computer graphics system generates what appears to be a 3D object on a 2D display device by generating 2D views of the 3D object. The 2D view of a 3D object which is generated at a particular time usually depends on a spatial relationship between the 3D object and a viewer of the 3D object at the particular time. This spatial relationship may be referred to as the view direction.
The process by which a computer graphics system generates the color values for a 2D view of a 3D object is commonly referred to as image rendering or scan conversion. A computer graphics system usually renders a 3D object by subdividing the 3D object into a set of polygons and rendering each of the polygons individually.
The color values for a polygon that are rendered for a particular view direction usually depend on the surface features of the polygon and the effects of lighting on the polygon. The surface features include features such as surface colors and surface structures. The effects of lighting usually depend on a spatial relationship between the polygon and one or more light sources. This spatial relationship may be referred to as the light source direction.
Typically, the evaluation of the effects of lighting on an individual pixel in a polygon for a particular view direction involves a number of 3D vector calculations. These calculations usually include floating-point square-root and divide operations. Such calculations are usually time consuming and expensive whether performed in hardware or software.
One prior method for reducing such computation overhead is to evaluate the effects of lighting at just a few areas of a polygon, such as the vertices, and then interpolate the results across the entire polygon. Examples of these methods include methods which are commonly referred to as flat shading and Gouraud shading. Such methods usually reduce the number of calculations that are performed during scan conversion and thereby increase rendering speed. Unfortunately, such methods also usually fail to render shading features that are smaller than the areas of individual polygons.
One prior method for rendering features that are smaller than the area of a polygon is to employ what is commonly referred to as a texture map. A typical texture map is a table that contains a pattern of color values for a particular surface feature. For example, a wood grain surface feature may be rendered using a texture map that holds a color pattern for wood grain.
Unfortunately, texture mapping usually yields relatively flat surface features that do not change with the view direction or light source direction. The appearance of real 3D objects, on the other hand, commonly do change with the view direction and/or light source direction. These directional changes are commonly caused by 3D structures on the surface of a polygon. Such structures can cause localized shading or occlusions or changes in specular reflections from a light source. The effects can vary with view direction for a given light source direction and can vary with light source direction for a given view direction.
One prior method for handling the directional dependance of such structural effects in a polygon surface is to employ what is commonly referred to as a bump map. A typical bump map contains a height field from which a pattern 3D normal vectors for a surface are extracted. The normal vectors are usually used to evaluate lighting equations at each pixel in the surface. Unfortunately, such evaluations typically involve a number of expensive and time consuming 3D vector calculations, thereby decreasing rendering speed or increasing graphics system hardware and/or software costs.